home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / pm65sdk / sourcecode / pagemakerclasslibrary / commands / playeroptions.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-10  |  1.5 KB  |  71 lines

  1. /*
  2.  *--- PLayerOptions.cpp --------------------------------------------------------
  3.  * Copyright (c) 1995-96 Adobe Systems Incorporated.  All rights reserved.
  4.  * Created on Sun, Oct 22, 1995 @ 3:29 PM by Paul Ferguson.
  5.  *
  6.  * Description:  For notes about this class, refer to the
  7.  * PCL documentation file PLayerOptions.html
  8.  *-------------------------------------------------------------------------
  9.  */
  10.  
  11. #include "PLayerOptions.h"
  12. #include "PRequestBuf.h"
  13. #include "PCommand.h"
  14.  
  15. const short CUSTOM_COLOR = 27;
  16.  
  17. PLayerOptions::PLayerOptions(
  18.                 const char     * sLayerName,
  19.                 const char     * sNewName,
  20.                 short        nShow,
  21.                 short        nLock,
  22.                 short        nColorIndex)
  23.  
  24. {
  25.     long    lRed = 0;
  26.     long    lGreen = 0;
  27.     long    lBlue = 0;
  28.     PRequestBuf request(strlen(sLayerName) + strlen(sNewName) + 22);
  29.     
  30.     
  31.     request << sLayerName
  32.             << sNewName
  33.             << nShow
  34.             << nLock
  35.             << nColorIndex
  36.             << lRed
  37.             << lGreen
  38.             << lBlue;
  39.  
  40.     PCommand command(pm_layeroptions, request);
  41. }
  42.  
  43. PLayerOptions::PLayerOptions(
  44.                 const char     * sLayerName,
  45.                 const char     * sNewName,
  46.                 short        nShow,
  47.                 short        nLock,
  48.                 long        lRed,
  49.                 long        lGreen,
  50.                 long        lBlue)
  51.  
  52. {
  53.     short    nColorIndex = CUSTOM_COLOR;
  54.     PRequestBuf request(strlen(sLayerName) + strlen(sNewName) + 22);
  55.     
  56.     
  57.     request << sLayerName
  58.             << sNewName
  59.             << nShow
  60.             << nLock
  61.             << nColorIndex
  62.             << lRed
  63.             << lGreen
  64.             << lBlue;
  65.  
  66.     PCommand command(pm_layeroptions, request);
  67. }
  68.  
  69.  
  70. // end of PLayerOptions.cpp
  71.